<template>
  <div class="container">
    <info-panel />
    <div class="link-view">
      <div
        class="link-item"
        @click="$global.navigate({ path: '/wallet/exchange' })"
      >
        <svg-icon icon-class="exchange" class="icon" />
        閃兌
        <svg-icon icon-class="arrow-right-2" class="right-icon" />
      </div>

      <div
        class="link-item"
        @click="$global.navigate({ path: '/wallet/pledge' })"
      >
        <svg-icon icon-class="lock" class="icon" />
        質押
        <svg-icon icon-class="arrow-right-2" class="right-icon" />
      </div>
    </div>
    <div class="tab-view">
      <van-tabs
        v-model:active="tabActive"
        line-width="16px"
        title-active-color="#2c2c2c"
        title-inactive-color="#919191"
        color="#0762ff"
        background="rgba(0,0,0,0)"
      >
        <van-tab title="幣種"></van-tab>
        <van-tab title="交易明細"></van-tab>
        <van-tab title="WONE明細"></van-tab>
      </van-tabs>
      <div class="tab-main">
        <template v-if="tabActive === 0">
          <item-currency v-for="(item, index) in 10" :key="index" />
        </template>
        <template v-if="tabActive === 1">
          <tab-view v-model="transactionTabIndex" />
          <item-transaction-details v-for="(item, index) in 10" :key="index" />
        </template>
        <template v-if="tabActive === 2">
          <tab-view v-model="woneTabIndex" />
          <item-wone-details v-for="(item, index) in 10" :key="index" />
        </template>
      </div>
    </div>
  </div>
</template>

<script>
import infoPanel from "./module/panel";
import itemCurrency from "./module/item-currency.vue";
import itemTransactionDetails from "./module/item-transaction-details.vue";
import itemWoneDetails from "./module/item-wone-details.vue";
import tabView from "./module/tab.vue";
export default {
  components: {
    infoPanel,
    itemCurrency,
    itemTransactionDetails,
    itemWoneDetails,
    tabView,
  },
  data() {
    return {
      tabActive: 0,
      transactionTabIndex: 0,
      woneTabIndex: 0,
    };
  },
  mounted() {},
  methods: {},
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
</style>
